package j05neibulei;


class Outer{
    int age = 4;
    class Inner{
        int age = 100;
        void printAge(){
            System.out.println("age = " + age);
            System.out.println(Outer.this.age);
        }
    }

    void f1(){
        System.out.println(new Inner());
        System.out.println("===========");
        new Inner().printAge();
    }
}

public class J1 {
    public static void main(String[] args) {
        new Outer().f1();
        //不推荐，理论上可以
//        Outer o1 = new Outer();
//        Outer.Inner i1 = o1.new Inner();
//        System.out.println("i1 = " + i1);
//        System.out.println(new Outer().new Inner());

    }
}
